﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using ZipAndUnzipDemo;

namespace FTPDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            // 根目录(bin\Deubg)
            string root = System.Environment.CurrentDirectory;
            // 打包上传到FTP服务器
            string[] FileProperties = new string[2];
            FileProperties[0] = root + "\\unzipped\\";
            FileProperties[1] = root +  "\\zip\\b.zip";
            ZipAndUnzipFile.ZipFile(FileProperties[0], FileProperties[1]);
            FTPHelper ftpDemo = new FTPHelper();
            ftpDemo.UpLoadFile("ftp://192.168.2.210/b.zip", FileProperties[1]);

            // 下载打包文件并且解压
            //string[] FileProperties = new string[2];
            //FileProperties[0] = root + "\\zip\\b.zip";
            //FileProperties[1] = root + "\\unzipped\\";
            //ftpDemo.DownLoadFile("ftp://192.168.2.210/b.zip", FileProperties[0]);
            //ZipAndUnzipFile.unZipFile(FileProperties[0], FileProperties[1]);

            Console.WriteLine("hello world!");
        }
    }
}
